<?php 
function getWday($thoigian){
	$kq=7;
	if($thoigian!=""){
		$ktdate=getdate(strtotime($thoigian));
		$kq= $ktdate[wday];
	}
	return $kq;	
}
?>